-- 获取接口id和用户id
local interfaceId = ARGV[1]
local userId = ARGV[2]
-- 生成剩余调用次数key
local leftNumKey = 'backend:interface:leftNum:' .. userId .. ':' .. interfaceId
redis.call('incr', leftNumKey)
redis.call('xadd', 'gateway:interface:updateLeftNumQueue', '*',
        'interfaceId', interfaceId, 'userId', userId, 'updateCount', 1, 'messageType', 1)